package com.shuogesha;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

import com.shuogesha.common.util.JsonResult;
import com.shuogesha.common.util.ResultCode;

/**
 * 后台接口
 * 
 * @author zhaohaiyuan
 *
 */
@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan(basePackages={"com.shuogesha.*.action","com.shuogesha.*.feign"})
@EnableFeignClients(basePackages = "com.shuogesha.*.client")
public class AdminApiApplication {

	public static void main(String[] args) {
		SpringApplication.run(AdminApiApplication.class, args);
	}

	/**
	 * 限流异常提醒
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public Object handleBlock(Integer pageNo, Integer pageSize) {
		return new JsonResult(ResultCode.EXCEPTION, "限流", null);
	}

}
